using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class ChecksPrintMap : EntityTypeConfiguration<ChecksPrint>
    {
        public ChecksPrintMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.CheckNo)
                .HasMaxLength(50);

            this.Property(t => t.Payee)
                .HasMaxLength(50);

            this.Property(t => t.PayeeArabic)
                .HasMaxLength(50);

            this.Property(t => t.Currency)
                .HasMaxLength(50);

            this.Property(t => t.CurrName)
                .HasMaxLength(50);

            this.Property(t => t.Addr1)
                .HasMaxLength(50);

            this.Property(t => t.Addr2)
                .HasMaxLength(50);

            this.Property(t => t.Addr3)
                .HasMaxLength(50);

            this.Property(t => t.File_Primary_Key)
                .HasMaxLength(10);

            // Table & Column Mappings
            this.ToTable("ChecksPrint");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.CheckNo).HasColumnName("CheckNo");
            this.Property(t => t.Payee).HasColumnName("Payee");
            this.Property(t => t.PayeeArabic).HasColumnName("PayeeArabic");
            this.Property(t => t.Amount).HasColumnName("Amount");
            this.Property(t => t.Date).HasColumnName("Date");
            this.Property(t => t.Currency).HasColumnName("Currency");
            this.Property(t => t.CurrName).HasColumnName("CurrName");
            this.Property(t => t.Addr1).HasColumnName("Addr1");
            this.Property(t => t.Addr2).HasColumnName("Addr2");
            this.Property(t => t.Addr3).HasColumnName("Addr3");
            this.Property(t => t.printed).HasColumnName("printed");
            this.Property(t => t.File_Primary_Key).HasColumnName("File Primary Key");
        }
    }
}
